//////////////////
/// mkI - Base ///
//////////////////

#pragma once

#include <cstddef>

// Platform spec.
#if defined( _WIN32 )
    #define MK_WIN32
#elif defined( _WIN64 )
    #define MK_WIN64
#endif

#if !defined( MK_PLATFORM_WIN ) && ( defined( MK_WIN32 ) || defined( MK_WIN64 ) )
    #define MK_PLATFORM_WIN
#endif

// Build spec.
#if ( defined( _DEBUG ) || defined( DEBUG ) ) && !defined( MK_DEBUG )
    #define MK_DEBUG
#endif // defined DEBUG

// Limit definitions.
#define MK_REAL32_MAX FLT_MAX
#define MK_UINT_MAX   UINT32_MAX

// Misc.
#define MK_UNUSED(x)   (void)x
#define MK_FORCEINLINE __forceinline
#define MK_NOEXCEPT    throw()
#define mkNew           new
#define mkDelete        delete

// C includes
#include <cstdlib>
#include <cmath>
#include <cstdarg>
#include <cstdio>
#include <cstring>

// STL includes
#include <vector>
#include <list>
#include <array>
#include <queue>
#include <valarray>
#include <bitset>
#include <memory>
#include <string>

#ifdef MK_PLATFORM_WIN
#include <Windows.h>
#include <winnt.h>
#endif

#ifdef MK_PLATFORM_WIN
#   define mkText(x)        L ## x
#   define mkThreadLocal    __declspec(thread)
#endif

namespace mk
{
    // Fundamental definitions.
    typedef unsigned int uint;
    typedef float        real32;
    typedef double       real64;
    typedef wchar_t      charW;

    // Forward declarations.
    enum Errno;

} // namespace mk

